define("widgets/base/core/class", [], function() {
	function t(e) {
		return this instanceof t || !c(e) ? void 0 : n(e)
	}

	function e(e) {
		var n, r;
		for (n in e) r = e[n], t.Mutators.hasOwnProperty(n) ? t.Mutators[n].call(this, r) : this.prototype[n] = r
	}

	function n(n) {
		return n.extend = t.extend, n.implement = e, n
	}

	function r() {}

	function i(t, e, n) {
		for (var r in e)
			if (e.hasOwnProperty(r)) {
				if (n && -1 === u(n, r)) continue;
				"prototype" !== r && (t[r] = e[r])
			}
	}
	t.create = function(r, s) {
		function o() {
			r.apply(this, arguments), this.constructor === o && this.initialize && this.initialize.apply(this, arguments)
		}
		return c(r) || (s = r, r = null), s || (s = {}), r || (r = s.Extends || t), s.Extends = r, r !== t && i(o, r, r.StaticsWhiteList), e.call(o, s), n(o)
	}, t.extend = function(e) {
		return e || (e = {}), e.Extends = this, t.create(e)
	}, t.Mutators = {
		Extends: function(t) {
			var e = this.prototype,
				n = s(t.prototype);
			i(n, e), n.constructor = this, this.prototype = n, this.superclass = t.prototype
		},
		Implements: function(t) {
			a(t) || (t = [t]);
			for (var e = this.prototype, n = t.shift(); n;) i(e, n.prototype || n), n = t.shift()
		},
		Statics: function(t) {
			i(this, t)
		}
	};
	var s = Object.__proto__ ? function(t) {
			return {
				__proto__: t
			}
		} : function(t) {
			return r.prototype = t, new r
		},
		o = Object.prototype.toString,
		a = Array.isArray || function(t) {
			return "[object Array]" === o.call(t)
		},
		c = function(t) {
			return "[object Function]" === o.call(t)
		},
		u = Array.prototype.indexOf ? function(t, e) {
			return t.indexOf(e)
		} : function(t, e) {
			for (var n = 0, r = t.length; r > n; n++)
				if (t[n] === e) return n;
			return -1
		};
	return t
}), define("widgets/base/core/event", [], function() {
	function t() {}

	function e(t, e, n) {
		var r = !0;
		if (t) {
			var i = 0,
				s = t.length,
				o = e[0],
				a = e[1],
				c = e[2];
			switch (e.length) {
				case 0:
					for (; s > i; i += 2) r = t[i].call(t[i + 1] || n) !== !1 && r;
					break;
				case 1:
					for (; s > i; i += 2) r = t[i].call(t[i + 1] || n, o) !== !1 && r;
					break;
				case 2:
					for (; s > i; i += 2) r = t[i].call(t[i + 1] || n, o, a) !== !1 && r;
					break;
				case 3:
					for (; s > i; i += 2) r = t[i].call(t[i + 1] || n, o, a, c) !== !1 && r;
					break;
				default:
					for (; s > i; i += 2) r = t[i].apply(t[i + 1] || n, e) !== !1 && r
			}
		}
		return r
	}

	function n(t) {
		return "[object Function]" === Object.prototype.toString.call(t)
	}
	var r = /\s+/;
	t.prototype.on = function(t, e, n) {
		var i, s, o;
		if (!e) return this;
		for (i = this.__events || (this.__events = {}), t = t.split(r); s = t.shift();) o = i[s] || (i[s] = []), o.push(e, n);
		return this
	}, t.prototype.once = function(t, e, n) {
		var r = this,
			i = function() {
				r.off(t, i), e.apply(n || r, arguments)
			};
		return this.on(t, i, n)
	}, t.prototype.off = function(t, e, n) {
		var s, o, a, c;
		if (!(s = this.__events)) return this;
		if (!(t || e || n)) return delete this.__events, this;
		for (t = t ? t.split(r) : i(s); o = t.shift();)
			if (a = s[o])
				if (e || n)
					for (c = a.length - 2; c >= 0; c -= 2) e && a[c] !== e || n && a[c + 1] !== n || a.splice(c, 2);
				else delete s[o];
		return this
	}, t.prototype.trigger = function(t) {
		var n, i, s, o, a, c, u = [],
			l = !0;
		if (!(n = this.__events)) return this;
		for (t = t.split(r), a = 1, c = arguments.length; c > a; a++) u[a - 1] = arguments[a];
		for (; i = t.shift();)(s = n.all) && (s = s.slice()), (o = n[i]) && (o = o.slice()), "all" !== i && (l = e(o, u, this) && l), l = e(s, [i].concat(u), this) && l;
		return l
	}, t.prototype.emit = t.prototype.trigger;
	var i = Object.keys;
	return i || (i = function(t) {
		var e = [];
		for (var n in t) t.hasOwnProperty(n) && e.push(n);
		return e
	}), t.mixTo = function(e) {
		function r(t) {
			e[t] = function() {
				return i[t].apply(o, Array.prototype.slice.call(arguments)), this
			}
		}
		var i = t.prototype;
		if (n(e)) {
			for (var s in i) i.hasOwnProperty(s) && (e.prototype[s] = i[s]);
			Object.keys(i).forEach(function(t) {
				e.prototype[t] = i[t]
			})
		} else {
			var o = new t;
			for (var s in i) i.hasOwnProperty(s) && r(s)
		}
	}, t
}), define("widgets/base/core/attribute", [], function() {
	return $ ? {
		initAttrs: function(t) {
			this.attrs = this.attrs || {};
			var e = this.constructor ? this.constructor.superclass.attrs : {};
			t = t || {}, $.isPlainObject(t) && (this.attrs = $.extend(!0, {}, e, this.attrs, t))
		},
		get: function(t) {
			return this.attrs[t]
		},
		set: function(t, e, n) {
			n = n || !0;
			var r = this.attrs[t];
			r ? n ? this.attrs[t] = e : $.isPlainObject(e) && $.extend(this.attrs[t], e) : this.attrs[t] = e, this.trigger("change:" + t, e, r, t)
		}
	} : {}
}), define("widgets/base/core/aspect", [], function() {
	function t(t, i, s, o) {
		for (var a, c, u = i.split(r); a = u.shift();) c = e(this, a), c.__isAspected || n.call(this, a), this.on(t + ":" + a, s, o);
		return this
	}

	function e(t, e) {
		var n = t[e];
		if (!n) throw new Error("Invalid method name: " + e);
		return n
	}

	function n(t) {
		var e = this[t];
		this[t] = function() {
			var n = Array.prototype.slice.call(arguments),
				r = ["before:" + t].concat(n);
			if (this.trigger.apply(this, r) !== !1) {
				var i = e.apply(this, arguments),
					s = ["after:" + t, i].concat(n);
				return this.trigger.apply(this, s), i
			}
		}, this[t].__isAspected = !0
	}
	return {
		before: function(e, n, r) {
			return t.call(this, "before", e, n, r)
		},
		after: function(e, n, r) {
			return t.call(this, "after", e, n, r)
		}
	};
	var r
}), define("widgets/base/index", ["widgets/base/core/class", "widgets/base/core/event", "widgets/base/core/attribute", "widgets/base/core/aspect"], function(t, e, n, r) {
	var i = t.create({
		Implements: [e, n, r],
		initialize: function(t) {
			this.initAttrs(t), this.init()
		},
		init: function() {},
		destroy: function() {
			this.off();
			for (var t in this) this.hasOwnProperty(t) && delete this[t];
			this.destroy = function() {}
		}
	});
	return i
}), define("widgets/widget/index", ["widgets/base/index"], function(t) {
	function e(t) {
		return t.charAt(0).toUpperCase() + t.substring(1)
	}

	function n(t) {
		return null == t || void 0 === t
	}

	function r(t) {
		for (var e = t.length - 1; e >= 0 && void 0 === t[e]; e--) t.pop();
		return t
	}

	function i() {
		return a + Math.floor(1e5 * Math.random() + 1)
	}
	if (!$) return {};
	var s = "_onRender",
		o = Array.prototype.slice,
		a = "_widget_",
		c = t.extend({
			el: null,
			events: {},
			attrs: {
				id: null,
				className: null,
				style: null,
				model: null,
				parentNode: "body",
				template: "<div></div>"
			},
			init: function() {
				this.parseElement(), this.addEvent(), this.setup()
			},
			parseElement: function() {
				if (this.el = $(this.el || this.attrs.el), 0 == this.el.length && this.parseElementFromTemplate(), !this.el || !this.el[0]) throw new Error("element is invalid");
				this.dom = {
					set: function(t, e) {
						return this[t] = e, this
					},
					get: function(t) {
						return this[t] ? this[t] : null
					}
				}, this.initDom()
			},
			initDom: function() {},
			parseElementFromTemplate: function() {
				this.el = $(this.get("template"))
			},
			addEvent: function(t, e, n) {
				var i = this,
					s = r(o.call(arguments));
				if (0 === s.length) t = this.el, e = i.events || {};
				else if (1 === s.length) e = t, t = this.el;
				else if (2 === s.length) {
					var a = {};
					a[t] = e, e = a, t = this.el
				} else {
					t = $(t);
					var a = {};
					a[e] = n, e = a
				}
				t.length || console && console.warn("element没有找到,请再次确认!"), $.each(e, function(e, n) {
					var r = e.split(" ");
					return r.length ? ($.isFunction(n) || (n = i[n]), $.isFunction(n) ? void(r[1] ? t.on(r[0], r[1], function(t) {
						n.call(i, t, $(t.currentTarget))
					}) : t.on(r[0], function(t) {
						n.call(i, t, $(t.currentTarget))
					})) : !0) : !0
				})
			},
			removeEvent: function() {
				this.el.off()
			},
			render: function() {
				this.rendered || (this._renderAndBindAttrs(), this.rendered = !0);
				var t = this.get("parentNode");
				return this.el.appendTo(t), this
			},
			_renderAndBindAttrs: function() {
				var t = this,
					r = t.attrs;
				for (var i in r)
					if (r.hasOwnProperty(i)) {
						var o = s + e(i);
						if ($.isFunction(t[o])) {
							var a = this.get(i);
							n(a) && "id" != i || t[o](a, void 0, i),
								function(e) {
									t.on("change:" + i, function(n, r, i) {
										t[e](n, r, i)
									})
								}(o)
						}
					}
			},
			_onRenderId: function(t) {
				var e = this.el.attr("id");
				$("#" + e).length && console && console.warn('id="' + e + '"的元素在页面上已经存在,请检查代码(是否new了多次 但是ID是同一个?)'), t ? this.el.attr("id", t) : e && "" != e || this.el.attr("id", i())
			},
			_onRenderClassName: function(t) {
				this.el.addClass(t)
			},
			_onRenderStyle: function(t) {
				this.element.css(t)
			},
			destroy: function() {
				this.removeEvent(), this.el.remove(), this.el = null, c.superclass.destroy.call(this)
			},
			setup: function() {},
			ajax: function(t, e, n, r) {
				return $.ajax({
					url: t || "",
					type: n || "POST",
					dataType: r || "json",
					data: e || {}
				})
			}
		});
	return c
});
define("widgets/pc/easing/index", [], function() {
	var t = Math.PI,
		e = Math.pow,
		i = Math.sin,
		n = 1.70158,
		s = {
			easeNone: function(t) {
				return t
			},
			easeIn: function(t) {
				return t * t
			},
			easeOut: function(t) {
				return (2 - t) * t
			},
			easeBoth: function(t) {
				return (t *= 2) < 1 ? .5 * t * t : .5 * (1 - --t * (t - 2))
			},
			easeInStrong: function(t) {
				return t * t * t * t
			},
			easeOutStrong: function(t) {
				return 1 - --t * t * t * t
			},
			easeBothStrong: function(t) {
				return (t *= 2) < 1 ? .5 * t * t * t * t : .5 * (2 - (t -= 2) * t * t * t)
			},
			backIn: function(t) {
				return 1 === t && (t -= .001), t * t * ((n + 1) * t - n)
			},
			backOut: function(t) {
				return (t -= 1) * t * ((n + 1) * t + n) + 1
			},
			backBoth: function(t) {
				var e = n,
					i = (e *= 1.525) + 1;
				return (t *= 2) < 1 ? .5 * t * t * (i * t - e) : .5 * ((t -= 2) * t * (i * t + e) + 2)
			},
			elasticIn: function(n) {
				var s = .3,
					o = s / 4;
				return 0 === n || 1 === n ? n : -(e(2, 10 * (n -= 1)) * i(2 * (n - o) * t / s))
			},
			elasticOut: function(n) {
				var s = .3,
					o = s / 4;
				return 0 === n || 1 === n ? n : e(2, -10 * n) * i(2 * (n - o) * t / s) + 1
			},
			elasticBoth: function(n) {
				var s = .45,
					o = s / 4;
				return 0 === n || 2 === (n *= 2) ? n : 1 > n ? -.5 * e(2, 10 * (n -= 1)) * i(2 * (n - o) * t / s) : e(2, -10 * (n -= 1)) * i(2 * (n - o) * t / s) * .5 + 1
			},
			bounceIn: function(t) {
				return 1 - s.bounceOut(1 - t)
			},
			bounceOut: function(t) {
				var e, i = 7.5625;
				return e = 1 / 2.75 > t ? i * t * t : 2 / 2.75 > t ? i * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? i * (t -= 2.25 / 2.75) * t + .9375 : i * (t -= 2.625 / 2.75) * t + .984375
			},
			bounceBoth: function(t) {
				return .5 > t ? .5 * s.bounceIn(2 * t) : .5 * s.bounceOut(2 * t - 1) + .5
			}
		};
	return $.extend($.easing, s), s
}), define("widgets/pc/slider/slider", ["widgets/widget/index", "widgets/pc/easing/index"], function(t) {
	var e = t.extend({
		attrs: {
			wrap: null,
			index: 0,
			step: 1,
			stepSize: 0,
			delay: 4e3,
			auto: !1,
			screenNum: null,
			changeEffect: "move",
			easeType: "swing"
		},
		events: {
			"click .ms_prev": "prev",
			"click .ms_next": "next",
			"mouseenter .ms_slider": "stop",
			"mouseleave .ms_slider": "start"
		},
		setup: function() {
			return this.get("wrap").length ? this.get("wrap").length > 1 ? void(console && console.warn("外层容器只能有一个!")) : (this.el = this.get("wrap"), this.initDom(), this.initData(), this.timer = null, void(this.get("count") <= this.get("screenNum") || (this.addEvent(), this._on(), this.get("auto") && this.auto()))) : void(console && console.warn("外层容器不存在 请检查"))
		},
		initDom: function() {
			this.dom.set("slider", this.el.find(".ms_slider").eq(0)).set("tips", this.el.find(".ms_tips").eq(0)).set("sItems", this.dom.get("slider").find(".ms_items")).set("tItems", this.dom.get("tips").find(".ms_items")).set("prev", this.el.find(".ms_prev")).set("next", this.el.find(".ms_next"))
		},
		initData: function() {
			!this.get("stepSize") && this.set("stepSize", this.dom.get("sItems").eq(0).outerWidth(!0)), this.set("count", this.dom.get("sItems").length), !this.get("screenNum") && this.set("screenNum", Math.ceil(this.el.width() / this.get("stepSize"))), this.set("indexCount", Math.ceil((this.get("count") - this.get("screenNum")) / this.get("step")))
		},
		_on: function() {
			this.dom.get("tItems").length && this.addEvent(this.dom.get("tItems"), "click", function(t, e) {
				this.changeItem(e.index())
			}), this.on("change:index", function(t) {
				$.isFunction(this.onChange) && this.onChange(t)
			})
		},
		effectFactory: function(t) {
			"move" == t ? this.effectMove() : "fade" == t && this.effectFade()
		},
		effectMove: function() {
			var t = this;
			this.dom.get("slider").stop(!1, !0).animate({
				left: -t.get("index") * t.get("step") * t.get("stepSize")
			}, {
				duration: 800,
				specialEasing: {
					left: t.get("easeType")
				},
				complete: function() {}
			})
		},
		effectFade: function() {},
		changeItem: function(t) {
			clearTimeout(this.timer), void 0 !== t && (t > this.get("indexCount") ? this.set("index", this.get("indexCount")) : 0 > t ? this.set("index", 0) : this.set("index", t)), this.dom.get("tItems").removeClass("on").eq(this.get("index")).addClass("on"), this.effectFactory(this.get("changeEffect")), this.get("auto") && this.auto()
		},
		auto: function() {
			clearTimeout(this.timer);
			var t = this;
			this.timer = setTimeout(function() {
				t.next()
			}, this.get("delay"))
		},
		start: function() {
			this.get("auto") && this.auto()
		},
		stop: function() {
			this.get("auto") && clearTimeout(this.timer)
		},
		changeBtnStatus: function() {
			this.get("index") ? this.get("index") >= this.get("indexCount") ? (this.dom.get("prev").removeClass("disabled"), this.dom.get("next").addClass("disabled")) : (this.dom.get("prev").removeClass("disabled"), this.dom.get("next").removeClass("disabled")) : (this.dom.get("prev").addClass("disabled"), this.dom.get("next").removeClass("disabled"))
		},
		prev: function() {
			this.get("index") ? this.set("index", this.get("index") - 1) : this.set("index", this.get("indexCount")), this.changeItem()
		},
		next: function() {
			this.get("index") == this.get("indexCount") ? this.set("index", 0) : this.set("index", this.get("index") + 1), this.changeItem()
		},
		getCount: function() {
			return this.get("count")
		},
		getCurrenPage: function() {
			return this.get("index") + 1
		}
	});
	return e
});